part of 'fragment.dart';

class _PaymentMethodFragmentWlocStateFactory {
  const _PaymentMethodFragmentWlocStateFactory._internal();

  static const _instance = _PaymentMethodFragmentWlocStateFactory._internal();

  factory _PaymentMethodFragmentWlocStateFactory() {
    return _instance;
  }

  _PaymentMethodFragmentWlocState create({
    required PaymentMethodFragmentBlocState blocState,
  }) {
    if (blocState is InitialPaymentMethodFragmentBlocState) {
      return const _InitialPaymentMethodFragmentWlocState();
    }

    if (blocState is LoadingPaymentMethodFragmentBlocState) {
      return const _LoadingPaymentMethodFragmentWlocState();
    }

    if (blocState is LoadedPaymentMethodFragmentBlocState) {
      return _LoadedPaymentMethodFragmentWlocState(
        webSavedPaymentMethods: blocState.webSavedPaymentMethods,
        editingMode: blocState.editingMode,
      );
    }

    throw UnimplementedError();
  }
}
